JavaScript Get Last Character of String